package cn.huanghuai.reggie.controller;

import cn.huanghuai.reggie.common.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/user")
@Slf4j
public class UserController {

    @PostMapping("/login")
    public R<String> login(HttpServletRequest request){
        request.getSession().setAttribute("user", 1417012167126876162L);
        return R.success("登录成功");
    }

}
